package cn.four.hqServer.modules.cardBinding.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
public class UserValidDto {
    /**
     * 身份证号
     */
    @NotNull(message = "身份证号")
    @NotEmpty(message = "请输入身份证号")
    @JsonProperty("userId")
    private String userId;


    @NotNull(message = "原银行卡号码不能为空")
    @NotEmpty(message = "请输入原银行卡号码")
    @JsonProperty("cardId")
    private String cardId;

    /**
     * 银行卡密码  6位数字
     */
    @NotNull(message = "原银行卡密码不能为空")
    @NotEmpty(message = "请输入原银行卡密码")
    @JsonProperty("password")
    private String password;


    @NotNull(message = "要更新的银行卡密码不能为空")
    @Length(message = "要更新的银行卡密码只能是 {max} 个字符", min=6,max = 6)
    @NotEmpty(message = "请输入更新的银行卡密码")
    @JsonProperty("newPassword")
    private String newPassword;
}
